Skip to content

feat: a saved key is hidden or refused at every other door - #1009

Merged
badcuban merged 3 commits into
mainfrom
feat/secret-scrubbing-2b
Nov 19, 2026
Merged

badcuban merged 3 commits into
mainfrom
feat/secret-scrubbing-2b

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Step 2b of hiding saved keys (docs/design/secret-scrubbing.md). Step 2a hid a key the agent prints in its replies and tool output. A key could still reach a thread, another agent, a page, a read-back screen or the debug log through other paths.

What changes:

  • Registry. The watched-keys registry now sits under the whole server runtime. The provider layer still fills it from saved keys at startup, before any provider event.
  • Commands the agent asks you to run. A request whose command or reason holds a key is refused. The run's output is scrubbed before the terminal cuts it to its last 16,000 characters, and the whole message sent back to the agent is scrubbed.
  • Room and thread tools. A call that would carry a key to another agent, a thread, a task or a card is refused with a message telling the agent what to do instead.
  • Pages. show_page refuses a page holding a key. A Claude artifact Threadlines adopts is scrubbed instead.
  • Read-backs. Claude's running command output, a background run's output file, subagent and workflow transcripts, workflow run files and the outside-session list hide keys. Only readable fields are scrubbed, never ids or status words. Live output that stops partway into a long key drops that partial key.
  • Imported sessions are scrubbed before anything is stored.
  • Provider failure text is scrubbed where the reactor stores it: the failure row and the session error that reaches phone alerts.
  • Native debug log. Lines are searched, and a matching line is parsed and scrubbed field by field so it stays valid JSON. Logs stay on, as decided; a key split across records can still appear in pieces.

Reviewed by GPT-6.2 Astra: five of its seven findings fixed. Left as they are: the startup retry that continues in the background (the 2a design), and the background-run reader keeping less than 8 KB when one key repeats many times.

Command runs, room tools, pages, provider read-backs, imported sessions,
provider failure text and the native debug log now hide or refuse a
watched key. The registry moves under the whole runtime; the provider
layer fills it at startup before any event.
Review fixes: scrub the whole command output message, the failure
activity and session error at their write sites, a partial key at the
end of live output, only readable fields of read-backs, and parse a
matched native log line before scrubbing it.
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 19, 2026 7:39am UTC

Request Review

Project notes (#1008) added project_note_write; it gets the same saved-key check as the other room tools that change something.
@badcuban
badcuban added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 3e67408 Nov 19, 2026
24 checks passed
@badcuban
badcuban deleted the feat/secret-scrubbing-2b branch November 19, 2026 07:52

This branch was previously deployed

1 inactive deployment
Preview — 25999af5 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant